home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sword.eng.pyramid.com!pyrltd!markb
- From: markb@pyramid.com (Mark Bluemel)
- Subject: Re: Tradition or what?
- Message-ID: <1996Mar15.163722.6685@pyra.co.uk>
- Sender: news@pyra.co.uk
- Organization: Pyramid Technology Ltd.
- X-Newsreader: TIN [version 1.2 PL2]
- References: <4g0elg$mdr@redstone.interpath.net> <4hpd8a$d70@alterdial.UU.NET> <1996Mar8.153250.115645@kuhub.cc.ukans.edu> <4hqfug$19l@news.interpath.net> <4hqkso$gno@news1.mnsinc.com>
- Date: Fri, 15 Mar 1996 16:37:22 GMT
-
- Szu-Wen Huang (huang@mnsinc.com) wrote:
- : Scott McMahan - Softbase Systems (softbase@mercury.interpath.net) wrote:
- : : anh@kuhub.cc.ukans.edu wrote:
- : : : Well, I found one good use of magic numbers such as when one needs a
- : : : localized temporary buffer of data.
- : : : Well, if I know the data is always going to be less than 15 or whatever,
- : : : there is really no need to use a #define here.
-
- : : You defeated your own argument!
-
- : : Suppose you "know" that your buffer is "always" going to be 80
- : : bytes. Then it changes to 132!
-
- : Let me join in. I use magic numbers for states in parsing tables,
- : and will shoot anybody who suggests I should #define state numbers.
- : I hope we buried the issue, now that I've given one good place to
- : use magic numbers instead of #define's.
-
- May I respectfully suggest that #defines would be clearer and enumerations
- clearer still ?
-
- --
- Mark Bluemel Unix/Oracle Trainer and Consultant
- My opinions are my own, but I'll share them
- All solutions to problems are offered "as is"
- and without warranty - you have been warned :-)
-